package com.iflytek.iot.platform;

import cn.zull.tracing.core.TraceThreadLocal;
import cn.zull.tracing.core.dto.TraceDTO;
import cn.zull.tracing.core.log.LogPrintHandlerUtils;
import com.iflytek.iot.platform.tracing.threadlocal.IotTracingThreadLocal;
import org.springframework.stereotype.Component;

/**
 * @author zurun
 * @date 2019/2/15 23:51:49
 */
@Component
public class IotTracingInterface {

    public String getTraceId() {
        return TraceThreadLocal.getTraceId();
    }

    public void setTraceId(String traceId) {
        TraceDTO context = TraceThreadLocal.getContext();
        context.setTraceId(traceId);
        LogPrintHandlerUtils.logHandler(context);
    }

    public void setRoom(String room) {
        IotTracingThreadLocal.setRoom(room);
    }

    public void setCmd(String cmd){
        IotTracingThreadLocal.setCmd(cmd);
    }

    public void setType(String type){
        IotTracingThreadLocal.setType(type);
    }

    public void setPodid(String podid){
        IotTracingThreadLocal.setPodid(podid);
    }

    public void setInner(String inner){
        IotTracingThreadLocal.setInner(inner);
    }

    public void setDeviceid(String deviceid){
        IotTracingThreadLocal.setDeviceid(deviceid);
    }


    public void setCtei(String ctei){
        IotTracingThreadLocal.setCtei(ctei);
    }

    public void setImei(String imei){
        IotTracingThreadLocal.setImei(imei);
    }

    public void setManufacturer(String manufacturer) {
        IotTracingThreadLocal.setManufacturer(manufacturer);
    }

    public void setModel(String model) {
        IotTracingThreadLocal.setModel(model);
    }

    public void setCategory(String category) {
        IotTracingThreadLocal.setCategory(category);
    }

    public void setCaller(String caller){
        IotTracingThreadLocal.setCaller(caller);
    }

    public void setUid(String uid){
        IotTracingThreadLocal.setUid(uid);
    }

    public void setRetcode(String retcode){
        IotTracingThreadLocal.setRetcode(retcode);
    }

    public void setRetdesc(String retdesc){
        IotTracingThreadLocal.setRetdesc(retdesc);
    }

    public void setCpname(String cpname){
        IotTracingThreadLocal.setCpname(cpname);
    }

    public void setSequenceNo(String sequenceNo){
        IotTracingThreadLocal.setSequenceNo(sequenceNo);
    }

    public void setOsid(String osid){
        IotTracingThreadLocal.setOsid(osid);
    }

    public void setReqpkg(String reqpkg) {
        IotTracingThreadLocal.setRespkg(reqpkg);
    }

    public void setRespkg(String respkg) {
        IotTracingThreadLocal.setRespkg(respkg);
    }

    public void setBrandname(String brandname) {
        IotTracingThreadLocal.setBrandname(brandname);
    }

    public void setDevicesn(String devicesn) {
        IotTracingThreadLocal.setDevicesn(devicesn);
    }

    public void setPlatform(String platform) {
        IotTracingThreadLocal.setPlatform(platform);
    }


}
